(* Método de Newton d=1 *)



f[x_]:=x^2-2x-1;
Df[x_]:=2x-2;
x=0;

e=10^(-5);
y=10000000000;
res={};

While[Abs[y-x]>e, 
y=x;
x=N[x-f[x]/Df[x],10] ;
res=Append[res,x]
]

res

Show[Plot[f[x],{x,-5,5}],
Graphics[{PointSize[Medium],Blue,Point[{res[[Length[res]]],0}]}]]